import request from '@/utils/request'

// 获取销售额
export const getOrderAmount = (data) =>
  request.get('/api/order-service/report/orderAmount', { params: data })

// 获取订单数
export const getOrderCount = (data) =>
  request.get('/api/order-service/report/orderCount', { params: data })

// 获取工单数据
export const getTaskReportInfo = (data) =>
  request.get(`/api/task-service/task/taskReportInfo/${data.start}/${data.end}`)

// 商品热榜
export const getSkuTop = (data) =>
  request.get(
    `/api/order-service/report/skuTop/10/${data.start.split(' ')[0]}/${data.end.split(' ')[0]}`
  )

// 获取故障的十个设备
export const getErrorStatus10 = () => request.get('/api/status-service/status/top10')

// 获取销售额统计
export const getAmountCollect = (num,data) => request.get(`/api/order-service/report/amountCollect/${num}/${data.start.split(' ')[0]}/${data.end.split(' ')[0]}`)

// 获取销售量分布
export const getRegionCollect = (data) => request.get(`/api/order-service/report/regionCollect/${data.start.split(' ')[0]}/${data.end.split(' ')[0]}`)
